# -*- coding: utf-8 -*-

from service import Service

class ChatService(Service):
    SERVICE_ID = 102

    def __init__(self):
        super(ChatService, self).__init__(ChatService.SERVICE_ID)
        commands = {
            1001 : self.groupChat,
            1002 : self.singleChat,
        }
        self.registers(commands)

    # 群聊
    def groupChat(self, msg):
        msg['sendType'] = 2
        return msg

    # 私聊
    def singleChat(self, msg):
        msg['sendType'] = 3
        return msg